package io.mvvm.controller;

import io.mvvm.ws.WebSocketChannelHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: Netty
 * @description: 消息发送工具
 * @author: 潘
 * @create: 2021-04-21 19:55
 **/
@RestController
public class SendMessageController {

    /**
     *
     * @param id    发送给用户
     * @param msg   发送消息
     */
    @GetMapping("/send")
    public void send(String id, String msg) {
        WebSocketChannelHolder.sendMsg(id, msg);
    }

}
